The present invention relates to a system for managing “files” defined by a file system of operating system (hereinafter referred to as an OS file system), under the control of a database management system (hereinafter referred to as a DBMS) and more particularly, to database-file link method and apparatus which are effective when the content of a file managed by the database management system is updated.
Datalinks in a database for managing external data are disclosed in “DATALINKS: MANAGING EXTERNAL DATA WITH DB2 UNIVERSAL DATABASE” by J. R. Davis, IBM CORPORATION, February 1999, pp 1-18.
For managing “files” or “directories” (hereinafter, a single file, plural files and a plurality of files concomitant with a directory structure are generally termed “contents”), a method is available in which location information of a file or directory (a so-called directory path) is written in one field inside a record. In this method, this stored data is seen as a mere character line when viewed from the DBMS side, so that the method does not recognize that the character line designates a file or directory and is unaware of the attribute including file size and of distinction between the file and the directory. In other words, the user must manage a contents designated by a directory path of interest independently of the DBMS. A user program preparing or creating a database according to the method as above searches the database by using a desired field as a search key and a character line in the field written with the directory path in a record of interest is acquired so that the character line may be regarded as the directory path to reference the contents.
According to the prior arts for directly storing the directory path in the record of the data-base, management of the external contents is carried out independently of management of the field storing the directory path and there is a possibility that update/delete applied to the external contents is executed asynchronously with update/delete of the field value in the database, thus making mismatching between the database and the external contents liable to occur. Once matching is disturbed, recovery of matched conditions is difficult to achieve.
Further, in the case of the aforementioned prior arts, in making the correspondence relation between the same contents and a plurality of fields in the database, the number of fields holding the correspondence relation must be managed additionally. Without this management, when a contents is updated and deleted, even the content of a link destination as viewed from a field of the database representing a different link originator is updated, resulting in mismatching. As will be seen from the above, it is difficult to apply the prior arts to the edition management of the contents by using the database.
As described above, the prior arts have difficulties in keeping the link matching between the database and the external file in operation, raising a problem that the confirmation procedure during execution of update/delete of the content of an external contents becomes complicated.